{* load lang file *}
{dynamic}
	{config_load file="lang`$smarty.const.PLANG`.txt" section="entry"}
{/dynamic}
{* the dynamic tag is neccessary such that these block of the template are not cached *}

		<!--- Entry Start -->
		
<div class="post-{$data.id} post" id="post-{$data.id}" style="margin-bottom: 10px;">

    <div class="p-head">
    <h1>{$data.subject}</h1>
    {if $data.section}
    <p class="p-cat">In: <a href="{$SERVER_ROOT}{$data.section.name}/" title="View all posts in {$data.section.fullName}" rel="category tag">{$data.section.fullName}</a></p>
    {/if}
    <small class="p-time">
    <strong class="day">{$data.intime|date_format:'%d'}</strong>
    <strong class="month">{$data.intime|date_format:'%b'}</strong>
    <strong class="year">{$data.intime|date_format:'%Y'}</strong>
    </small>
    </div>

    <div class="p-con">
    {if $data.image}<img src="{$SERVER_ROOT}thumb/{$data.id}/" align="left" hspace="10" vspace="4" alt="Icon" />{/if}
    {$data.content}

    {if $data.section}
        <p><b>{#secRel#} {$data.section.fullName}:</b>
            {entries var="myEntries" items=5 section=$data.section.id intime=600}
            <ul class="lentries">
                {foreach from=$myEntries item=entry name=latest}
                <li><a href="{$entry.url|regex_replace:'/\.html/':'/'}" rel="bookmark" title="Permanent Link: {$entry.subject}">{$entry.subject}</a> {if $entry.commentcount > 0}({$entry.commentcount}){/if}</li>
                {/foreach} 
            </ul>
        </p>
    {else}
        <p><b>{#latestPosts#}:</b>
            {entries var="myEntries" items=5 intime=600}
            <ul class="lentries">
                {foreach from=$myEntries item=entry name=latest}
                <li><a href="{$entry.url|regex_replace:'/\.html/':'/'}" rel="bookmark" title="Permanent Link: {$entry.subject}">{$entry.subject}</a> {if $entry.commentcount > 0}({$entry.commentcount}){/if}</li>
                {/foreach} 
            </ul>
        </p>
    {/if}

    </div>
    
    <div class="p-det">
        <ul>
            <li class="p-det-tag">
            {if $data.keywords}<b>{#keys#}</b>:
                {foreach from=$data.keywords item=keyword name=myKeys}
                    {if not $smarty.foreach.myKeys.last}
                    <a href="{$SERVER_ROOT}keyword/{$keyword.link}/" rel="tag">{$keyword.word}</a>,
                    {else}
                    <a href="{$SERVER_ROOT}keyword/{$keyword.link}/" rel="tag">{$keyword.word}</a>
                    {/if}
                {/foreach}
            {/if}
            </li>
        </ul>
    
    <!-- {if $data.ljurl} | <a href="http://www.livejournal.com/users/{$smarty.const.LJ_USER}/{$data.ljurl}.html">@<b>lj</b></a>{/if} -->
    {dynamic}
    {if $smarty.session.admin}
    <div class="adminm">[ <a href="{$SELF}delete/" OnClick="return confirmLink(this,'{#youSure#}');">{#delete#}</a> : <a class="post-edit-link" href="{$SELF}edit/">{#edit#}</a> ]</div>
    {/if}
    {/dynamic}				
    </div> 

</div>
<!-- If comments are open, but there are no comments. -->
{include file="comments.htm"}
<!--- Entry End -->